package dao

// 这是 UmsMemberRuleSetting 的全局公开dao对象，被service层调用!
var UmsMemberRuleSettingDao = umsMemberRuleSettingDao{}

// 这是 ums_member_rule_setting表 的实体类
type UmsMemberRuleSetting struct {
	ConsumePerPoint   float64 `json:"consume_per_point" form:"consume_per_point" v:"consume_per_point"`       // 每消费多少元获取1个点
	ContinueSignDay   int32   `json:"continue_sign_day" form:"continue_sign_day" v:"continue_sign_day"`       // 连续签到天数
	ContinueSignPoint int32   `json:"continue_sign_point" form:"continue_sign_point" v:"continue_sign_point"` // 连续签到赠送数量
	Id                int64   `json:"id" form:"id" v:"id"`
	LowOrderAmount    float64 `json:"low_order_amount" form:"low_order_amount" v:"low_order_amount"`          // 最低获取点数的订单金额
	MaxPointPerOrder  int32   `json:"max_point_per_order" form:"max_point_per_order" v:"max_point_per_order"` // 每笔订单最高获取点数
	Types             int32   `json:"types" form:"types" v:"types"`                                           // 类型：0-&gt;积分规则；1-&gt;成长值规则

}

// 注意:这是 UmsMemberRuleSetting 的私有dao对象，只能在dao层内使用!
type umsMemberRuleSettingDao struct {
	InsertTemplate func(arg UmsMemberRuleSetting) (int64, error)                               //插入一条记录
	UpdateTemplate func(arg UmsMemberRuleSetting) (int64, error)                               //更新一条记录
	DeleteTemplate func(id int64) (int64, error)                                               `args:"id"`                         //根据传入的主键删除一条记录
	SelectTemplate func(id int64) (UmsMemberRuleSetting, error)                                `args:"id"`                         //根据传入的主键获取一条记录
	List           func(keyword string, pageNum, pageSize int) ([]UmsMemberRuleSetting, error) `args:"keyword,page_num,page_size"` //模糊分页查询
}

/*
// 这是 ums_member_rule_setting 表的Postman测试参数
// 该结构体中的字段就是: 前后端交互的json字段!
type UmsMemberRuleSettingPostman struct {
consume_per_point
continue_sign_day
continue_sign_point
id
low_order_amount
max_point_per_order
types

}*/

// 这是 ums_member_rule_setting 表的批量请求参数
type UmsMemberRuleSettingReq struct {
	List []UmsMemberRuleSetting `json:"list" form:"list"`
}
